﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace SX.GateWay
{
    /// <summary>
    /// appsetting.json配置
    /// </summary>
    public class Appsettings
    {
        /// <summary>
        /// 数据库连接字符串
        /// </summary>
        public string DbConn { get; set; }
        /// <summary>
        /// redis
        /// </summary>
        public List<string> RedisConns { get; set; } = new List<string>();
        /// <summary>
        /// redis缓存 key前缀
        /// </summary>
        public string RedisKeyPrefix { get; set; } = "GateWay";

        /// <summary>
        /// consul
        /// </summary>
        public Consul Consul { get; set; } = new Consul();
        /// <summary>
        /// 服务列表
        /// </summary>
        public List<ServiceModel> ServiceList { get; set; } = new List<ServiceModel>();



    }

    public class Consul
    {
        public string IP { get; set; }
        public int Port { get; set; } 
    }

    public class ServiceModel
    {
        public string IP { get; set; }
        public int Port { get; set; }
        public string Name { get; set; }
        public string HealthCheckUrl { get; set; }
    }
}
